package com.asset.salesforce.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.asset.salesforce.model.Login;
import com.asset.salesforce.service.LoginService;


@Controller
public class LoginController {

	@Autowired
	private LoginService loginService;
	
	
	@RequestMapping(value="/getLogin", method = RequestMethod.GET
			,headers="Accept=application/json")
    public @ResponseBody Login getLogin() {
        System.out.println("success ");
		Login login = loginService.getLogin("clever21", "hisham@owner.com");
		return login;
    }	
}
